<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/basedata/basedata/base_processlist.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/basedata/basedata/base_processlist.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'processlist_id',
                footer: "Foots",
                cnName: '工序数据采集',
                name: 'basedata/base_processlist',
                url: "/base_processlist/",
                sortName: "processlist_id"
            });
            const editFormFields = ref({"datapointtype":"","datapointname":""});
            const editFormOptions = ref([[{"dataKey":"datapointtype","data":[],"title":"类型","field":"datapointtype","type":"select"}],
                              [{"title":"名称","field":"datapointname","type":"text"}]]);
            const searchFormFields = ref({"process_id":"","datapointtype":"","datapointname":""});
            const searchFormOptions = ref([[{"dataKey":"process","data":[],"title":"工序","field":"process_id","type":"select"},{"dataKey":"datapointtype","data":[],"title":"类型","field":"datapointtype","type":"select"},{"title":"名称","field":"datapointname","type":"like"}]]);
            const columns = ref([{field:'processlist_id',title:'主键Id',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'process_id',title:'工序',type:'int',bind:{ key:'process',data:[]},width:110,align:'left',sort:true},
                       {field:'datapointtype',title:'类型',type:'string',bind:{ key:'datapointtype',data:[]},width:220,align:'left'},
                       {field:'datapointname',title:'名称',type:'string',width:220,align:'left'},
                       {field:'CreateID',title:'创建人编号',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'Modifier',title:'更新人',type:'string',width:100,align:'left'},
                       {field:'ModifyDate',title:'更新时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ModifyID',title:'更新人编号',type:'int',width:100,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
